package cn.edu.zxj.message_wall.model;

import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2023-11-07
 * @time: 22:09:11
 */
@Data
public class MessageInfo {
    private Integer id;
    private String from;
    private String to;
    private String message;
    private int deleteFlag;
    private Date createTime;
    private Date updateTime;

    public boolean isLegal() {
        return StringUtils.hasLength(from)
                && StringUtils.hasLength(to)
                && StringUtils.hasLength(message);
    }

}
